package cn.kkcxy.blog.core.enums;

import lombok.Getter;

/**
 * @BelongsProject: kkcxy-weblog
 * @BelongsPackage: cn.kkcxy.weblog.common.base.enums
 * @Author: kkcxy
 * @CreateTime: 2024-07-20 19:02
 * @Description: 是否删除枚举
 * @Version: 1.0
 */
@Getter
public enum DeletedEnum {

    NO(0, "未删除"),
    YES(1, "已删除");

    private final int status;

    private final String description;

    DeletedEnum(int status, String description) {
        this.status = status;
        this.description = description;
    }

    public static DeletedEnum getEnum(int status) {
        for (DeletedEnum deletedEnum : DeletedEnum.values()) {
            if (status == deletedEnum.status) {
                return deletedEnum;
            }
        }
        return null;
    }
}
